import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";


@Entity("mall_order_goods",{schema:"nest-mall" } )
@Index("order_id",["orderId",])
@Index("goods_id",["goodsId",])
export class MallOrderGoods {

    @PrimaryGeneratedColumn({
        type:"mediumint", 
        name:"id"
        })
    id:number;
        

    @Column("mediumint",{ 
        nullable:false,
        default: () => "'0'",
        name:"order_id"
        })
    orderId:number;
        

    @Column("mediumint",{ 
        nullable:false,
        default: () => "'0'",
        name:"goods_id"
        })
    goodsId:number;
        

    @Column("varchar",{ 
        nullable:false,
        length:120,
        name:"goods_name"
        })
    goodsName:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:60,
        name:"goods_sn"
        })
    goodsSn:string;
        

    @Column("mediumint",{ 
        nullable:false,
        default: () => "'0'",
        name:"product_id"
        })
    productId:number;
        

    @Column("smallint",{ 
        nullable:false,
        default: () => "'1'",
        name:"number"
        })
    number:number;
        

    @Column("decimal",{ 
        nullable:false,
        default: () => "'0.00'",
        scale:2,
        name:"market_price"
        })
    marketPrice:string;
        

    @Column("decimal",{ 
        nullable:false,
        default: () => "'0.00'",
        scale:2,
        name:"retail_price"
        })
    retailPrice:string;
        

    @Column("text",{ 
        nullable:true,
        name:"goods_specifition_name_value"
        })
    goodsSpecifitionNameValue:string | null;
        

    @Column("tinyint",{ 
        nullable:true,
        default: () => "'0'",
        name:"is_real"
        })
    isReal:number | null;
        

    @Column("varchar",{ 
        nullable:true,
        name:"goods_specifition_ids"
        })
    goodsSpecifitionIds:string | null;
        

    @Column("varchar",{ 
        nullable:true,
        name:"list_pic_url"
        })
    listPicUrl:string | null;
        
}
